//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.mouslisten;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import org.come.Frame.BoothBoxJframe;
import org.come.Frame.ZhuFrame;
import org.come.Jpanel.RechargeVIPJpanel;
import org.come.bean.GoodsBean;
import org.come.entity.Goodstable;
import org.come.entity.RoleSummoning;
import org.come.until.FormsManagement;
import org.come.until.GoodsListFromServerUntil;

public class RechargeVIPGoodsMouslisten implements MouseListener {
    private int index;
    RechargeVIPJpanel rechargeVIPJpanel;
    private GoodsBean goodsBean;
    public RechargeVIPGoodsMouslisten(int index) {
        this.index = index;
    }

    @Override
    public void mouseClicked(MouseEvent e) {
//    	Goodstable good = rechargeVIPJpanel.GoodstableList.get(this.index);
//        if (good != null) {
//            if (GoodsListFromServerUntil.isJY(good)) {
//                ZhuFrame.getZhuJpanel().addPrompt2("物品无法交易");
//            } else {
//                BoothBoxJframe.getBoothboxjframe().getBoothboxjpanel().XZBuy(good, (RoleSummoning)null);
//            }
//        }
    }

    @Override
    public void mousePressed(MouseEvent e) {
    	if(e.isMetaDown()){//检测鼠标右键单击
			FormsManagement.HideForm(3002);
		}
    }

    @Override
    public void mouseReleased(MouseEvent e) {
    }

    @Override
    public void mouseEntered(MouseEvent e) {
    	if(this.index < RechargeVIPJpanel.GoodstableList.size()) {
    		if (RechargeVIPJpanel.GoodstableList.get(this.index) != null) {
    			Goodstable goodstable = RechargeVIPJpanel.GoodstableList.get(this.index);
    			ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
    		}
    	}
    }

    @Override
    public void mouseExited(MouseEvent e) {
        ZhuFrame.getZhuJpanel().cleargoodtext();
    }
}
